package com.sanyang.logistics.liuxu.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.sanyang.logistics.liuxu.mapper.DwMapper;
import com.sanyang.logistics.pojo.Product;
import com.sanyang.logistics.pojo.StandardUnit;
import com.sanyang.logistics.pojo.Warehouse;

@Repository("dwdao")
public class Dwdaoimpl implements Dwdao{
     @Autowired
	private DwMapper mapper;
     
     //查询全部
     @Override
 	public List<StandardUnit> dwqueryAll(StandardUnit unit) {
    	 try {
 		List<StandardUnit> dwqueryAll = mapper.dwqueryAll(unit);
 		return dwqueryAll;
    	 } catch (Exception e) {
 			e.printStackTrace();
 		}
 		return null;
 	}
     
	//单位模糊查询
//	@Override
//	public List<StandardUnit> dwqueryOne(StandardUnit sUnit) {
//		try {
// List<StandardUnit> dwqueryOne = mapper.dwqueryOne(sUnit);
//		return dwqueryOne;
//		} catch (Exception e) {
//			e.printStackTrace();
//		}
//		return null;
//	}
    //单位删除
	@Override
	public void dwdel(Integer unitid) {
		mapper.dwdel(unitid);		
	}
   //单位添加
	@Override
	public void dwinsert(StandardUnit sUnit) {
		mapper.dwinsert(sUnit);
		
	}
	//修改拿值
	@Override
	public StandardUnit dwxuigai(Integer unitid) {
		return mapper.dwxuigai(unitid);
	}
	//修改
	@Override
	public void dwupdate(StandardUnit sUnit) {
		mapper.dwupdate(sUnit);
		
	}

	@Override
	public List<StandardUnit> queryStandard_unit() {
		// TODO Auto-generated method stub
		return mapper.queryStandard_unit();
	}
	
	

}
